package com.ulife.gw.api;

import com.ulife.gw.api.code.UserServiceErrorCode;
import com.ulife.gw.api.model.User;
import net.pocrd.annotation.ApiGroup;
import net.pocrd.annotation.ApiParameter;
import net.pocrd.annotation.DesignedErrorCode;
import net.pocrd.annotation.HttpApi;
import net.pocrd.define.SecurityType;

import java.util.List;

/**
 * Created by Rocky on 2015/12/18.
 */
@ApiGroup(name = "user",minCode = 10000,maxCode = 20000,codeDefine = UserServiceErrorCode.class,owner = "Rocky")
public interface UserService {

    @HttpApi(name = "user.get",desc = "获取用户信息",security = SecurityType.None,owner = "Rocky")
    @DesignedErrorCode({UserServiceErrorCode.USER_NOT_FOUND})
    User get(@ApiParameter(required = true,name = "id",desc = "用户编号") String id);

    @HttpApi(name = "user.list",desc = "获取用户列表",security = SecurityType.None,owner = "Rocky")
    List<User> list();
}
